#
# build a calculator in chapter 04 which based on
#  the Recursive Descent Parser(RDP) in chapter 03, and
#  the Table-Driven lexer in directory '../chap03_rdp/'.
#

set(EXE_CALC   rdpcalc)
file(GLOB_RECURSE  rdpcalc_c
        *.c
        ../chap03_rdp/lexer.c
)
file(GLOB_RECURSE  rdpcalc_h  *.h)

include_directories(../chap03_rdp)

add_executable(${EXE_CALC}  ${rdpcalc_c})

set_target_properties(${EXE_CALC} PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY          ${MY_BIN_PATH}
        RUNTIME_OUTPUT_DIRECTORY_DEBUG    ${MY_BIN_PATH}/DEBUG
        RUNTIME_OUTPUT_DIRECTORY_RELEASE  ${MY_BIN_PATH}/RELEASE
)
